<template>
  <div id="main2" style="width: 100%; height: 100%" />
</template>

<script>
import * as echarts from 'echarts'
export default {
  data() {
    return {
      option: {
        tooltip: {
          show: true
        },
        series: [
          {
            name: '学科分布',
            type: 'pie',
            radius: [10, 50],
            center: ['50%', '50%'],
            roseType: 'area',
            itemStyle: {
              borderRadius: 0
            },
            data: [
              { value: 320, name: '前端' },
              { value: 240, name: 'java' },
              { value: 149, name: 'python' },
              { value: 100, name: 'c++' },
              { value: 59, name: 'UI' }
            ]
          }
        ]
      }
    }
  },
  mounted() {
    var chartDom = document.getElementById('main2')
    var myChart = echarts.init(chartDom)
    this.option && myChart.setOption(this.option)
  }
}
</script>

<style></style>
